#include<bits/stdc++.h>
using namespace std;
typedef long long ll;

void solve(){
    int n;
    cin>>n;
    string s;
    cin>>s;
    if(n<3){
    	cout<<"No"<<'\n';
    	return;
    }
    if(s[n-3]=='t'&&s[n-2]=='e'&&s[n-1]=='a'){
		cout<<"Yes"<<'\n';
		return;
	}
    cout<<"No"<<'\n';
}

int main(){
    ios::sync_with_stdio(0);
    cin.tie(0),cout.tie(0);
    int t=1;
    // cin>>t;
    while(t--){
        solve();
    }
    return 0;
}